import request from '@/utils/request.js'

export default {
	// 新增 或保存 靠 add_id 来判断的
	reqSaveAddress(data) {
		return request.post('/order/saveAddress', data)
	},
	// 获取地址列表
	reqAddressList(data){
		return  request.post('/order/getAddrList', data)
	},
	// 删除地址
	deleteAddress(data){
		return request.post('/order/del_order', data)
	},
	// 取消订单
	cancelOrder(data){
		return request.post('/order/cancel_order', data)
	},
	// 设置默认地址
	reqSetDefaultAddress(data){
		return request.post('/order/set_default_addr', data)
	},
	// 获取默认地址
	reqGetDefaultAddr(data){
		return request.post('/order/get_default_addr', data)
	},
	// 确定订单
	reqCheckOrder(data) {
		return request.post('/order/checkOrder', data)
	},
	//提交订单
	reqSubmitOrder(data) {
		return request.post('/order/submitOrder', data)
	},
	// 获取订单详情
	reqOrderDetail(data) {
		return request.post('/order/getOrderDetail', data)
	},
	//支付订单
	reqPayOrder(data,header){ 
		return request.post('/order/payOrder', data,{ header })
	},
	//查询订单
	reqQueryOrder(data){
		return request.post('/order/query_order', data)
	},
	// 订单列表
	reqOrderList(data) {
		return request.post('/order/getOrderList', data)
	},
	// 确认收货
	reqShouHuo(data){
		return request.post('/order/shouhuo', data)
	},
	// 查看物流
	reqWuLiu(data){
		return request.post('/order/wuliu', data)
	},
	// 模拟发货
	reqSend(data){
		return request.post('/order/send', data)
	},
	// 提交评价
	reqSubmitEvaluate(data){
		return request.post('/order/saveOrderEvaluateAdd', data)
	}
}